<template>
  <el-form :model="form" ref="form" size="small" label-width="80px" label-position="right">
    <template v-if="form.list && form.list.length">
      <div v-for="(item, index) in form.list" :key="item.uuid">
        <div class="flex">
          <el-form-item style="width:40%" label="起运地">
            {{item.departDistrictName}}
          </el-form-item>
          <el-form-item label="目的地">
            {{item.arriveDistrictName}}
          </el-form-item>
        </div>
        <el-divider v-if="index !== form.list.length - 1"></el-divider>
      </div>
    </template>
    <template v-else>
      <el-empty :image-size="80" description="暂无常跑线路"></el-empty>
    </template>
  </el-form>
</template>

<script>
export default {
  name: 'addresssDetail',
  props: {
    data: {
      type: Object,
      default: () => {}
    },
  },
  data() {
    return {
      form: {
        list: this.data.lineList
      },
    };
  },
  watch: {
    data: {
      handler(val) {
        this.form.list = val.lineList || []
      },
    },
  },
  methods: {
  }
};
</script>
